package cn.iocoder.yudao.module.api.infrastructure.config.dto;

import cn.iocoder.yudao.framework.validation.Percent;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.util.List;

/**
 * 财务配置信息 Response DTO
 *
 * @author 山野羡民
 */
@Data
public class PayConfigRespDTO {

    //===== 支付 =====

    @Schema(description = "第三方支付结果回调地址", example = "https://example.local/app-api/pay/order/notify")
    private String payNotifyUrl;

    @Schema(description = "第三方支付跳转回调地址", example = "https://example.local/app-api/pay/order/redirect")
    private String payRedirectUrl;

    @Schema(description = "第三方退款结果回调地址", example = "https://example.local/app-api/pay/refund/notify")
    private String refundNotifyUrl;

    @Schema(description = "第三方转账结果回调地址", example = "https://example.local/app-api/pay/transfer/notify")
    private String transferNotifyUrl;

    @Schema(description = "第三方商户审核回调地址", example = "https://example.local/app-api/pay/splitting/notify/register")
    private String merchantNotifyUrl;

    @Schema(description = "第三方分账结果回调地址", example = "https://example.local/app-api/pay/splitting/notify/compete")
    private String splittingNotifyUrl;

    //===== 提现 =====

    @Schema(description = "提现功能是否启用", example = "true")
    private boolean cashOutEnabled;

    @Schema(description = "提现支持的转账类型", example = """
            ["wechat", "bank"]
            """)
    private List<String> cashOutTransferType;

    @Schema(description = "最低提现金额，单位：分", example = "5000")
    @Min(value = 0, message = "最低提现金额不能小于 0")
    private int cashOutMinMoney;

    @Schema(description = "提现是否自动审核通过", example = "false")
    private boolean cashOutAutoVerify;

    @Schema(description = "提现是否自动转账", example = "false")
    private boolean cashOutAutoTransfer;

    @Schema(description = "手续费百分比", example = "5")
    @Percent
    private double cashOutFeePercent;

    @Schema(description = "公益基金百分比", example = "5")
    @Percent
    private double cashOutWelfarePercent;

    @Schema(description = "提示信息", example = "温馨提示\n1、提现金额50，提现手续费0.05%；\n2、提现申请提交后，平台将在1~7个工作日内完成审核。")
    private String cashOutTips;

}
